<template>
	<div>
		<el-container style="position: absolute;top: 55px;bottom: 0;left: 0;right: 0;">
			<el-header class="d-flex align-items-center">
				<!--头部-->

			</el-header>
			<el-container>
				<el-aside width="200px" style="position: absolute;top: 60px;left: 0;bottom: 60px;">
					<!--侧边-->
				</el-aside>
				<el-container>
					<el-main style="position: absolute;top: 60px;left: 200px;bottom: 60px;right: 0;">
						<el-row>
							<el-col>
								<el-card class="box-card" shadow="never">
									<el-table :data="tableData" height="600" border style="width: 100%">
										<el-table-column type="index" label="#" width="50">
										</el-table-column>
										<el-table-column prop="enterpriseName" label="企业名称">
										</el-table-column>
										<el-table-column prop="pointName" label="点位名称" width="150">
										</el-table-column>
										<el-table-column prop="groupNumber" label="组号" width="60">
										</el-table-column>
										<el-table-column prop="alias" label="因子" width="100">
										</el-table-column>
										<el-table-column prop="installLocation" label="安装位置" width="100">
										</el-table-column>
										<el-table-column prop="latestCollectData" label="值" width="100">
										</el-table-column>
										<el-table-column prop="dataCollectTime" label="时间" width="260">
										</el-table-column>
									</el-table>

								</el-card>
							</el-col>
						</el-row>
					</el-main>
				</el-container>
			</el-container>
			<el-footer>
				<!--尾部-->
			</el-footer>
		</el-container>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				tableData: []
			}
		},
		mounted() {
			this.getLatestDatas(),
			this.$axios.get('http://192.168.2.38:8080/getEnterpriseInfo')
					.then(res=>{console.log(res);})
			this.$axios.get('http://192.168.2.38:8080/getEnterpriseInfoByName?keywords=无锡大禹')
			.then(res=>{console.log(res);})
		},
		methods: {
			getLatestDatas() {
				this.$axios.get('/api/services/app/LatestData/GetLatestDataList')
					.then(res=>{this.tableData=res.data.result;})
			}
		}
	}
</script>
<style>
	.el-header,
	.el-footer {
		background-color: #B3C0D1;
		color: #333;
	}

	.el-aside {
		background-color: #D3DCE6;
		color: #333;
	}

	.el-main {
		background-color: #E9EEF3;
		color: #333;
	}
</style>
